﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasertTemplates.Master" AutoEventWireup="true" CodeBehind="PaymentRecord.aspx.cs" Inherits="WebApplication.PaymentRecord" %>
<%@ Register TagPrefix="uc1" TagName="usermeg" Src="~/UserControl/UserMessageControl.ascx" %>
<%@ Register TagPrefix="uc1" TagName="MBtab" Src="~/UserControl/MeberShipTabUC.ascx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
 <script type="text/javascript">
     $(document).ready(function () {
        

     })

     // mouse over 
     function mouseOverWrap(th)
     {
         th.style.backgroundColor = '#eee ';
         self = $(th);
         self.find(".deleteFormImg").css("visibility", "visible");
     }
     //mouse out
      function mouseOutWrap(th)
     {
         th.style.backgroundColor = 'white ';
         self = $(th);
         self.find(".deleteFormImg").css("visibility", "hidden");

     }
     //Delete form()
     function DeleteThis(th) {

         self = $(th);
         //alert(th);
         self.parents(".activeformback").remove();

     }

     //add function
     function AddFormModel(type, more) {
         //item
         var str1 = "<div onmouseover=\"mouseOverWrap(this)\" onmouseout=\"mouseOutWrap(this)\" class=\"activeformback\">";
         str1+= "<img src=\"Media/Css/images/del-select.png\" class=\"deleteFormImg\"  onclick='DeleteThis(this)' />";
         str1+="<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td>";
         str1+="<p class=\"upinput\">Payment Method</p><input type=\"text\" class=\"input200\" value=\"Cheque, T/T, Cash, Bank-in\"/>";
         str1+="</td><td><p class=\"upinput\">Bill No.</p><select class=\"select200\" ><option></option></select></td><td>";
         str1+="<p class=\"upinput\">Payment Type</p><select class=\"select200\" ><option>Payment / Refund/ </option></select>";
         str1+="</td></tr><tr><td><p class=\"upinput\">Payment Amount</p><table width=\"205\"><tr><td style=\"padding-bottom:0\"><select >";
         str1+="<option>HKD</option></select></td><td align=\"right\"  style=\"padding-bottom:0\"><input type=\"text\" class=\"input150\" ";
         str1+="value=\"CustomerID/ Customer name\"/></td></tr></table></td><td><p class=\"upinput\">To A/C Date <img src=\"Media/Css/images/Email-pic.png\" ";
         str1+="class=\"upimg\" /></p><input type=\"text\" class=\"input200\"    /></td><td><p class=\"upinput\">Bank-In Date</p><input ";
         str1+="type=\"text\" class=\"input200\"  /></td></tr><tr><td><p class=\"upinput\">Bank in Slip no. </p><input type=\"text\" class=\"input200\"  />";
         str1+="</td><td><p class=\"upinput\">Attachment </p><input type=\"file\" class=\"input100\" size=\"18\" /><div class=\"italicTxt\">";
         str1+="copy of cheque.jpg</div></td><td></td></tr><tr><td colspan=\"3\"><p class=\"upinput\">Remarks </p><textarea class=\"textarea800\"></textarea>";
         str1+="</td></tr></table></div>";

         var str2 = "<div onmouseover=\"mouseOverWrap(this)\" onmouseout=\"mouseOutWrap(this)\"  class=\"activeformback\">";
          str2+= "<img src=\"Media/Css/images/del-select.png\" class=\"deleteFormImg\"  onclick='DeleteThis(this)' />";
          str2+="<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td><p class=\"upinput\">Coupon No.</p>";
          str2+="<input type=\"text\" class=\"input200\"   /></td><td><p class=\"upinput\">Amount</p> <input type=\"text\" class=\"input200\"    /></td><td> <p ";
          str2+= "class=\"upinput\">Bank-in Date</p><input type=\"text\" class=\"input200\"   /></td></tr></table></div>";

         var str3 = "<div onmouseover=\"mouseOverWrap(this)\" onmouseout=\"mouseOutWrap(this)\" class=\"activeformback\">";
          str3+= "<img src=\"Media/Css/images/del-select.png\" class=\"deleteFormImg\"  onclick='DeleteThis(this)' />";
         str3+= "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td><p class=\"upinput\">Coupon No.</p>";
         str3+= "<input type=\"text\" class=\"input200\"   /></td><td><p class=\"upinput\">Amount</p> <input type=\"text\" class=\"input200\"    /></td><td> <p ";
         str3+= "class=\"upinput\">Bank-in Date</p><input type=\"text\" class=\"input200\"   /></td></tr></table></div>";

       
         str = "";
         INid = "";
        switch (type)
        {
            case "p":
                str = str1;
                INid = "PaymentWrap";
                break;
            case "ea":
                str = str2;
                INid = "HKEA";
                break;
            case "dc":
                str = str3;
                INid = "HKTDC";
                break;        
        }

        var msg = "最多可以放"+more+"個";
        var len = $("#" + INid).find(".activeformback").size();
        if (len < more)
           {
                $("#" + INid).append(str);
                if (len < 4)
                    $("#" + INid).prev(".addimg").show();
                else
                    $("#" + INid).prev(".addimg").hide();
            }
            else 
            {
                $("#" + INid).prev(".addimg").hide();
                alert(msg)
            }
        }



    


 </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
 <input type="hidden" value="t2" id="pageName" />
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
<uc1:usermeg ID="usermeg" runat="server" ></uc1:usermeg> 
<div class="partWrap">
<uc1:MBtab ID="MBtabs" runat="server" />
<div class="clear20"></div>
<table  border="0" width="100%">
<tr>
<td  >Customer</td>
<td>Customer Type</td>
<td>Membership Status</td>
<td>Join Date -Expire Date</td>
<td>Membership Fee</td>
<td>Balance</td>
</tr>
</table>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
 <p class="upinput">Record Date</p>
	  <input type="text" class="input200" value="CustomerID/ Customer name"     />
</td>
<td>
  <p class="upinput">A/C #</p>
	    <select class="select200" >
         <option></option>       
      </select>
</td>
<td>
   <p class="upinput">Business Code</p>	
      <select class="select200" >
         <option></option>        
      </select>
</td>
</tr>
<tr>
<td>
 <p class="upinput">A/C Code</p>
	  <input type="text" class="input200" value="CustomerID/ Customer name"     />
</td>
<td>
 
</td>
<td>
  
</td>
</tr>
<tr>
<td>
 <p class="upinput">Payment Status <img src="Media/Css/images/Email-pic.png" class="upimg" /></p>	 
      <select class="select200" >
      <option>In process / confirm By A/C</option>
      </select>
</td>
<td> 
</td>
<td>  
</td>
</tr>
</table>

<h4 class="title20">Payment Item <img src="Media/Css/images/add-green.png" class="upimg addimg" onclick='AddFormModel("p",10)' /></h4>
<div class="PaymentWrap" id="PaymentWrap">
<div id="Itm1" class="activeformback">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
 <p class="upinput">Payment Method</p>
	  <input type="text" class="input200" value="Cheque, T/T, Cash, Bank-in"     />
</td>
<td>
  <p class="upinput">Bill No.</p>
	    <select class="select200" >
         <option></option>       
      </select>
</td>
<td>
   <p class="upinput">Payment Type</p>	
      <select class="select200" >
         <option>Payment / Refund/ 
</option>        
      </select>
</td>
</tr>
<tr>
<td>
 <p class="upinput">Payment Amount</p>
 <table width="205">
 <tr>
 <td style="padding-bottom:0"><select >
 <option>
 HKD
 </option> 
 </select>
 </td>
  <td align="right"  style="padding-bottom:0"> <input type="text" class="input150" value="CustomerID/ Customer name"      /></td>
 </tr>
 </table>
	 
</td>
<td>
  <p class="upinput">To A/C Date <img src="Media/Css/images/Email-pic.png" class="upimg" /></p>
  <input type="text" class="input200"    />
</td>
<td>
   <p class="upinput">Bank-In Date</p>
   <input type="text" class="input200"      />

</td>
</tr>
<tr>
<td>
 <p class="upinput">Bank in Slip no. </p>	 
      <input type="text" class="input200"      />
</td>
<td> 
 <p class="upinput">Attachment </p>
 <input type="file" class="input100" size="18" />
 <div class="italicTxt">copy of cheque.jpg</div>
</td>
<td>  
</td>
</tr>
<tr>
<td colspan="3">
 <p class="upinput">Remarks </p>	 
  <textarea class="textarea800"></textarea>   
</td>

</tr>
</table>
</div>
</div>


<h4 class="title20">HKEA Cash Coupon <img src="Media/Css/images/add-green.png" class="upimg addimg" onclick='AddFormModel("ea",10)' /></h4>
<div id="HKEA">
<div  class="activeformback">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
 <p class="upinput">Coupon No.</p>
	  <input type="text" class="input200"      />
</td>
<td>
  <p class="upinput">Amount</p>
	  <input type="text" class="input200"      />
</td>
<td>
   <p class="upinput">Bank-in Date</p>	
     <input type="text" class="input200"      />
</td>
</tr>
</table>
</div>

</div>
<h4 class="title20">HKTDC Cash Copon <img src="Media/Css/images/add-green.png" class="upimg addimg" onclick='AddFormModel("dc",10)' /></h4>
<div id="HKTDC">
<div  class="activeformback">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
 <p class="upinput">Coupon No.</p>
	  <input type="text" class="input200"      />
</td>
<td>
  <p class="upinput">Amount</p>
	  <input type="text" class="input200"      />
</td>
<td>
   <p class="upinput">Bank-in Date</p>	
     <input type="text" class="input200"      />
</td>
</tr>
</table>
</div>

</div>
<div class="clear20"></div>
 <table  border="0" cellspacing="0" cellpadding="0" class="btnwrap">
			  <tr>
				<td  class="btnwrapl">
				 <ul class="uibtn">
    	              <li><span>Save</span></li>
	             </ul>
				</td>
				<td class="btnwrapr">
				 <ul class="uibtn">
    	           <li><span>Quit</span></li>
	              </ul>
				</td>
                <td >
                </td>				
			  </tr>
			</table>
</div>
</asp:Content>
